Visual Basic 2012 Unleashed (2nd Edition) by Del Sole Alessandro

Visual Basic 2012 Unleashed (2nd Edition) by Del Sole Alessandro

Author:Del Sole, Alessandro [Del Sole, Alessandro]
Language: eng
Format: epub
Publisher: Pearson Education
Published: 2013-01-17T00:00:00+00:00


Figure 28.2. Available project templates for WPF applications.

Table 28.1. WPF Project Templates

This chapter shows you WPF in action with a desktop Windows application. Select the WPF application template and name the new project WPFDemo_Chapter28. After a few seconds, the IDE shows the code editor, so in Solution Explorer double-click the MainWindow.xaml file so you access the designer, as shown in Figure 28.3.

Figure 28.3. The IDE is ready on a new WPF project.

As you can see, things are a little different from a Windows Forms project. In the upper part of the IDE, you can see the designer showing the main window of the new application. On the left side is the Toolbox; this is a tool that you already understand and that contains specific WPF controls. In the lower part of the IDE is a special code editor for the eXtensible Application Markup Language (XAML, pronounced as ZAMEL) that you must know as a WPF developer. The next section describes XAML and explains how it works. In Solution Explorer, you can see a new kind of file, with the .xaml extension. Each .xaml file can represent a window, control (or set of controls), or set of resources. For each .xaml file there is a Visual Basic code-behind file (with a .xaml.vb extension) that you can access by expanding the filename. The reason for this separation between the .xaml file and the .xaml.vb file is part of a key concept in the WPF development, which is the separation of roles between developers and designers that is described better in the next section.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.